<?php

namespace app\controller;

use think\facade\Db;
use think\facade\Request;

class SolutionController
{
    /**
     * 获取解决方案文章列表
     * @return \think\response\Json
     */
    public function getSolutionArticles()
    {
        $articles = Db::table('solution_articles')->select();
        return json($articles);
    }

    /**
     * 保存解决方案文章
     * @return \think\response\Json
     */
    public function saveSolutionArticle()
    {
        $data = Request::post();
        $id = Db::table('solution_articles')->insertGetId($data);
        return json(['code' => 200, 'msg' => '保存成功', 'id' => $id]);
    }

    // 其他解决方案相关接口方法...
}
